﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Threading.Tasks;
using System.Windows;

namespace content
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App:Application
    {
        public static void ExecConsoleApp(string arg)
        {
            string path=System.Reflection.Assembly.GetExecutingAssembly().Location;
            path=path.Replace(@"content\bin\Debug\netcoreapp3.1\content.exe", @"ExampleConsoleApp\bin\Debug\netcoreapp3.0\ExampleConsoleApp.exe");
            path=path.Replace(@"content\bin\Debug\netcoreapp3.1\content.dll", @"ExampleConsoleApp\bin\Debug\netcoreapp3.0\ExampleConsoleApp.exe");
            path=path.Replace(@"content\bin\Debug\net5.0\content.exe", @"ExampleConsoleApp\bin\Debug\net5.0\ExampleConsoleApp.exe");
            path = path.Replace(@"content\bin\Debug\net5.0\content.dll", @"ExampleConsoleApp\bin\Debug\net5.0\ExampleConsoleApp.exe");
            path = path.Replace(@"content\bin\Debug\content.dll", @"ExampleConsoleApp\bin\Debug\ExampleConsoleApp.exe");
            path = path.Replace(@"content\bin\Debug\content.exe", @"ExampleConsoleApp\bin\Debug\ExampleConsoleApp.exe");
            System.Diagnostics.Process.Start(path,arg);
        }
    }
}